package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-08-04
 * Time: 20:02
 */
@RestController
@RequestMapping("/u")
public class TestController2 {
    @RequestMapping("/h")
    public String getName(HttpServletRequest request){
        return "Name"+request.getParameter("name" );
    }
    @RequestMapping("/b")
    public String getName2(String name){
        return "Name"+name;
    }
    @RequestMapping("/d")
    public String get(String name,Integer age){
        return "Name"+name+"Age"+age;

    }

}
